
import edu.faytechcc.csc.business.FileUtilities;
import java.io.File;
import javax.swing.JFileChooser;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Charles
 */
public class DeleteDir
{

    public static void main(String[] args)
    {

        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

        int returnVal = fc.showOpenDialog(null);
        if (returnVal == JFileChooser.APPROVE_OPTION) //false means canceled
        {
            File file = fc.getSelectedFile();
           
            FileUtilities.deleteDirectory(file);
        }
    }
}
